package cn.shenchao.jms;

import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

public class Listener implements MessageListener {

	@Override
	public void onMessage(Message message) {
		TextMessage textMessage = (TextMessage) message;
		if (textMessage != null) {
			try {
				System.out.println("listener 收到了消息" + textMessage.getText());
			} catch (Exception e) {
				e.printStackTrace();
			}

		}
	}
}
